home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
PET
/
S-Super PET
/
(s)t2.d64
/
DISAS.LST
< prev
next >
Wrap
File List
|
2009-01-18
|
14KB
|
251 lines
1 nam ** disas.asm ** sp9000 82/10/25
2 ; Byte feb 82 (start address in x register)
3 0000 outch rmb 2
4 0002 curadr rmb 2
5 0004 wrkadr rmb 2
6 0006 length rmb 1
7 0007 page1 rmb 1
8 0008 opcd rmb 1
9 0009 postb rmb 1
10 000A byte1 rmb 1
11 000B byte2 rmb 1
12 000C indflg rmb 1
13 000D indbyt rmb 1
14 000E nxtbuf rmb 2
15 0010 buffer equ *
16 0010 rmb 4
17 0014 rmb 1
18 0015 rmb 2
19 0017 rmb 2
20 0019 rmb 2
21 001B rmb 1
22 001C hexb rmb 4
23 0020 rmb 2
24 0022 mnem rmb 5
25 0027 rmb 1
26 0028 oprand rmb 21
27 003D endbuf equ *
28 003D org $0
29 xref getchar_
30 xref initstd_
31 xref putchar_
32 xref crt
33 0000 BD 00 00 jsr initstd_
34 0003 8E 00 69 ldx #text
35 loop
36 0006 E6 80 ldb ,x+ ;load char in b
37 0008 27 09 quif eq
38 000A 34 10 pshs x
39 000C BD 00 00 jsr putchar_;display char
40 000F 35 10 puls x
41 0011 20 F3 endloop
42 0013 3F stp swi
43 0014 C6 17 lp9 ldb #$17 ;disassemle 23 lines
44 0016 17 01 25 lp8 lbsr disas9
45 0019 5A decb
46 001A 26 FA bne lp8
47 001C 34 10 inchar pshs x
48 001E BD 00 00 jsr getchar_
49 0021 35 10 puls x
50 0023 C1 71 cmpb #'q ; quit if q
51 0025 27 EC beq stp
52 0027 C1 5E cmpb #'^ ; uparrow backup $80
53 0029 27 1A beq backup
54 002B C1 70 cmpb #'p ; print screen
55 002D 27 35 beq crtdmp
56 002F C1 0D cmpb #$0d ; press <cr> to continue
57 0031 27 E1 beq lp9
58 0033 C1 66 cmpb #'f
59 0035 22 E5 bhi inchar ; branch if higher
60 0037 C1 30 cmpb #'0
61 0039 25 E1 blo inchar ; branch if lower
62 003B C1 61 cmpb #'a
63 003D 24 0D bhs itshexa
64 003F C1 39 cmpb #'9
65 0041 23 0B bls itshex
66 0043 20 D7 bra inchar
67 0045 CC FF 80 backup ldd #$ff80
68 0048 30 8B leax d,x
69 004A 20 D0 bra inchar
70 004C CB 09 itshexa addb #9
71 004E C4 0F itshex andb #$0f ;get rid of ascii
72 0050 86 04 lda #4
73 0052 BF 01 86 stx $0186
74 0055 78 01 87 lp7 asl $0187
75 0058 79 01 86 rol $0186
76 005B 4A deca
77 005C 26 F7 bne lp7
78 005E BE 01 86 ldx $0186
79 0061 3A abx
80 0062 20 B8 bra inchar
81 0064 BD 00 00 crtdmp jsr crt
82 0067 20 B3 bra inchar
83 0069 55 73 69 6E text fcc "Using monitor load in the x register the disassembly "
84 009E 73 74 61 72 fcc "starting address,then press g pcr+1 <cr>."
85 00C8 20 55 73 65 fcc " Use hexnumber <cr> for new location, <cr> for next screen,"
86 0103 20 70 20 3C fcc " p <cr> for printout, ^<cr> for backing up and q <cr> for "
87 013D 00 fcb 0
88 013E 34 66 disas9 pshs a,b,y,u
699 0742 30 C9 00 10 eoj4 leax buffer,u
700 0746 C6 27 ldb #$27
701 0748 E7 C9 00 06 stb length,u
702 074C E6 80 eoj5 ldb ,x+
703 074E 6A C9 00 06 dec length,u
704 0752 C1 0D cmpb #$0d
705 0754 27 04 beq asciii
706 0756 8D 2B bsr outb
707 0758 20 F2 bra eoj5
708 075A C6 20 asciii ldb #$20 ;use blanks to separate
709 075C 8D 25 bsr outb ; ascii print out from
710 075E 6A C9 00 06 dec length,u ; disassembly
711 0762 26 F6 bne asciii
712 0764 30 C9 00 15 leax buffer+5,u ;output ascii
713 0768 8D 21 bsr pack1 ;get 7x2 bytes
714 076A C6 0D ldb #$0d
715 076C 8D 15 bsr outb
716 076E 35 04 puls b
717 0770 1D sex
718 0771 E3 C9 00 02 addd curadr,u
719 0775 ED C9 00 02 std curadr,u
720 0779 AE C9 00 02 ldx curadr,u
721 077D 32 C8 3D leas endbuf-outch,u
722 0780 35 66 puls a,b,y,u
723 0782 39 rts
724 0783 34 10 outb pshs x
725 0785 BD 00 00 jsr putchar_
726 0788 35 10 puls x
727 078A 39 rts
728 078B 86 09 pack1 lda #$9
729 078D 34 02 packit pshs a
730 078F E6 80 ldb ,x+
731 0791 8D 30 bsr ascnib
732 0793 C1 20 cmpb #$20
733 0795 27 22 beq blank
734 0797 1E 89 exg a,b ;save nibble in a
735 0799 E6 80 ldb ,x+
736 079B 8D 26 bsr ascnib
737 079D C1 20 cmpb #$20
738 079F 27 18 beq blank
739 07A1 58 lslb
740 07A2 58 lslb
741 07A3 58 lslb
742 07A4 58 lslb
743 07A5 58 lslb
744 07A6 49 rola
745 07A7 58 lslb
746 07A8 49 rola
747 07A9 58 lslb
748 07AA 49 rola
749 07AB 58 lslb
750 07AC 49 rola
751 07AD 1E 89 exg a,b ;two nibbles in b
752 07AF C1 20 cmpb #$20
753 07B1 25 06 blo blank
754 07B3 C1 7E cmpb #$7e
755 07B5 22 02 bhi blank
756 07B7 20 02 bra blnk
757 07B9 C6 20 blank ldb #$20
758 07BB 8D C6 blnk bsr outb
759 07BD 35 02 puls a
760 07BF 4A deca
761 07C0 26 CB bne packit
762 07C2 39 rts
763 07C3 C1 46 ascnib cmpb #$46
764 07C5 22 11 bhi nogood
765 07C7 C1 30 cmpb #$30
766 07C9 25 0D blo nogood
767 07CB C1 3A cmpb #$3a
768 07CD 25 06 blo good
769 07CF C1 41 cmpb #$41
770 07D1 25 05 blo nogood
771 07D3 C0 07 subb #$7
772 07D5 C4 0F good andb #$0f
773 07D7 39 rts
774 07D8 C6 20 nogood ldb #$20
775 07DA 39 rts
776 07DB 64 78 79 75 regtab fcc "dxyusp**abcd****"
777 07EB 70 73 79 78 stktab fcc "psyxdbac"
778 07F3 6E 65 67 20 mntab fcc "neg "
779 07F7 2A 2A 2A 20 mnileg fcc "*** "
780 07FB 2A 2A 2A 20 fcc "*** "
781 07FF 63 6F 6D 20 fcc "com "
782 0803 6C 73 72 20 fcc "lsr "
783 0807 2A 2A 2A 20 fcc "*** "
784 080B 72 6F 72 20 fcc "ror "
785 080F 61 73 72 20 fcc "asr "
786 0813 61 73 6C 20 fcc "asl "
787 0817 72 6F 6C 20 fcc "rol "
788 081B 64 65 63 20 fcc "dec "
789 081F 2A 2A 2A 20 fcc "*** "
790 0823 69 6E 63 20 fcc "inc "
791 0827 74 73 74 20 fcc "tst "
792 082B 6A 6D 70 20 fcc "jmp "
793 082F 63 6C 72 20 fcc "clr "
794 0833 2A 2A 2A 20 fcc "*** "
795 0837 2A 2A 2A 20 fcc "*** "
796 083B 6E 6F 70 20 fcc "nop "
797 083F 73 79 6E 63 fcc "sync"
798 0843 2A 2A 2A 20 fcc "*** "
799 0847 2A 2A 2A 20 fcc "*** "
800 084B 62 72 61 20 fcc "bra "
801 084F 62 73 72 20 fcc "bsr "
802 0853 2A 2A 2A 20 fcc "*** "
803 0857 64 61 61 20 fcc "daa "
804 085B 6F 72 63 63 fcc "orcc"
805 085F 2A 2A 2A 20 fcc "*** "
806 0863 61 6E 64 63 fcc "andc"
807 0867 73 65 78 20 fcc "sex "
808 086B 65 78 67 20 fcc "exg "
809 086F 74 66 72 20 fcc "tfr "
810 0873 62 72 61 20 fcc "bra "
811 0877 62 72 6E 20 fcc "brn "
812 087B 62 68 69 20 fcc "bhi "
813 087F 62 6C 73 20 fcc "bls "
814 0883 62 68 73 20 fcc "bhs "
815 0887 62 6C 6F 20 fcc "blo "
816 088B 62 6E 65 20 fcc "bne "
817 088F 62 65 71 20 fcc "beq "
818 0893 62 76 63 20 fcc "bvc "
819 0897 62 76 73 20 fcc "bvs "
820 089B 62 70 6C 20 fcc "bpl "
821 089F 62 6D 69 20 fcc "bmi "
822 08A3 62 67 65 20 fcc "bge "
823 08A7 62 6C 74 20 fcc "blt "
824 08AB 62 67 74 20 fcc "bgt "
825 08AF 62 6C 65 20 fcc "ble "
826 08B3 6C 65 61 78 fcc "leax"
827 08B7 6C 65 61 79 fcc "leay"
828 08BB 6C 65 61 73 fcc "leas"
829 08BF 6C 65 61 75 fcc "leau"
830 08C3 70 73 68 73 fcc "pshs"
831 08C7 70 75 6C 73 fcc "puls"
832 08CB 70 73 68 75 fcc "pshu"
833 08CF 70 75 6C 75 fcc "pulu"
834 08D3 2A 2A 2A 20 fcc "*** "
835 08D7 72 74 73 20 fcc "rts "
836 08DB 61 62 78 20 fcc "abx "
837 08DF 72 74 69 20 fcc "rti "
838 08E3 63 77 61 69 fcc "cwai"
839 08E7 6D 75 6C 20 fcc "mul "
840 08EB 2A 2A 2A 20 fcc "*** "
841 08EF 73 77 69 20 fcc "swi "
842 08F3 73 75 62 61 fcc "suba"
843 08F7 63 6D 70 61 fcc "cmpa"
844 08FB 73 62 63 61 fcc "sbca"
845 08FF 73 75 62 64 fcc "subd"
846 0903 61 6E 64 61 fcc "anda"
847 0907 62 69 74 61 fcc "bita"
848 090B 6C 64 61 20 fcc "lda "
849 090F 73 74 61 20 fcc "sta "
850 0913 65 6F 72 61 fcc "eora"
851 0917 61 64 63 61 fcc "adca"
852 091B 6F 72 61 20 fcc "ora "
853 091F 61 64 64 61 fcc "adda"
854 0923 63 6D 70 78 fcc "cmpx"
855 0927 6A 73 72 20 fcc "jsr "
856 092B 6C 64 78 20 fcc "ldx "
857 092F 73 74 78 20 fcc "stx "
858 end
0933 bytes of object code (ASM6809 V1.1 00:17:50)